<!DOCTYPE html>
<head>
    <script src="https://cdn.jsdelivr.net/npm/vue@2.6.12"></script>
</head>
<body>
    <style>
        .outside{
            width:200px;
            height:200px;
            border:1px solid red;
            text-align: center;
           
        }
        .inside{
            width:100px;
            height:100px;
            border:1px solid black;
            margin:  20%;
        }
    </style>
    
    <div id="app"> 
       <div class="outside" @click="outside">
           <div class="inside" @click="inside">冒泡事件</div>
       </div>
    </div>
    <script>    
    new Vue({
       el:'#app',
       methods:{
           outside:function(){
               alert("外面的div")
           },
           inside:function(){
               alert("内部的div")
           }
       }
    })
</script>
</body>

</html>
